package com.javalab._7thread._3Lock._3JUC._2Condition;

public class Consumer extends Thread {
    private MyStack myStack;
    public Consumer(MyStack myStack) {
        this.myStack = myStack;
    }

    @Override
    public void run() {
        try {
            while (true) {
                myStack.pop();
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
